home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3771 < prev    next >
Encoding:
Text File  |  1996-08-05  |  990 b   |  23 lines

  1. Newsgroups: comp.lang.c
  2. Path: cwi.nl!dik
  3. From: dik@cwi.nl (Dik T. Winter)
  4. Subject: Re: division problem 
  5. Message-ID: <DM0urI.1JL@cwi.nl>
  6. Sender: news@cwi.nl (The Daily Dross)
  7. Nntp-Posting-Host: chrysant.cwi.nl
  8. Organization: CWI, Amsterdam
  9. References: <4ej4ha$66@fountain.mindlink.net> <DLzvGG.2rn@uns.bris.ac.uk> <Pine.SOL.3.90.960130150923.21923F-100000@flute>
  10. Date: Wed, 31 Jan 1996 01:28:30 GMT
  11.  
  12. In article <Pine.SOL.3.90.960130150923.21923F-100000@flute> Darrell Grainger <a378grai@cdf.toronto.edu> writes:
  13.  > In your 'trick' you would have 1.5 + 0.4444... = 1.9444... and
  14.  > (int)1.9444... = 1. This means that 1.5 rounds down to 1. This is not
  15.  > proper.
  16.  
  17. Yup, indeed, but how do you think you obtain 1.5 from an integer divided
  18. by 9?  The formula is an integer divided by 9 so all tricks that properly
  19. round 9ths are valid.
  20. -- 
  21. dik t. winter, cwi, kruislaan 413, 1098 sj  amsterdam, nederland, +31205924098
  22. home: bovenover 215, 1025 jn  amsterdam, nederland; http://www.cwi.nl/~dik/
  23.